#include <maya/MString.h>
#include "..\CommLib\CommStructs.h"
class Connection;

class VNet {

private:

	struct tSendData {
		char* pBytes;
		u_int sizeInBytes;
		u_int ID;
	};
	
	static bool g_isMonitoring;
	static HANDLE g_hMontiorConnection;
	static DWORD WINAPI MonitorConnection(LPVOID);

public:
#pragma message("MOVE WEN DONE WITH GEOM SEND")
	static Connection g_Client;
	static MString g_Status;

	static bool Connect();
	static bool Disconnect();
	static bool IsConnected();
	static MString Status();

	static MString HostAddress;

	static bool SendTransform(MObject& childObject, MObject& transformObject);
	static bool SendGeometry(MObject& targetObject);
	static bool SendParameters(MObject& targetObject);
	static bool SendSamplers(MObject& targetObject);
	static bool SendSampler(MObject& targetObject, MObject& samplerObject, uint partIndex, MString& channel);
	static bool SendSampler(MObject& targetObject,MObject& samplerObject,  MString& childObject, MString& channel);
	static bool SendDeformation(MObject& targetObject);
	static bool SendInstancing(MObject& targetObject);

	static bool SendMeshRemoved(MObject& targetMesh);
	static bool SendSceneLight();
	static bool SendSceneViewpoint();

	static bool QueryServer(QuerysStructs::tViewerInfoQuery& query, char** pDataOut, uint *pDataSize);
};
